import { BirthdayRemind } from '@/types/birthdayRemind'
import { defineStore } from 'pinia'
import { ref } from 'vue'

const initBirthdayRemind = {
  name: '女朋友62岁生日',
  birthday: '2025-04-12',
  remindDate: '',
  remindTime: '',
  remark: '记得给他换个假牙',
}

export const useBirthdayRemind = defineStore(
  'birthdayRemind',
  () => {
    const birthdayRemind = ref<BirthdayRemind>({ ...initBirthdayRemind })

    const setBirthdayRemind = (val: BirthdayRemind) => {
      birthdayRemind.value = val
    }

    return {
      birthdayRemind,
      setBirthdayRemind,
    }
  },
  {
    persist: true,
  },
)
